/* 
 * File:   JobControl.h
 * Author: weeteck
 *
 * Created on 17. listopad 2012, 23:51
 */

#ifndef JOBCONTROL_H
#define	JOBCONTROL_H

#include <list>


//#include "Job.h"
class Job;

// globalni promenne
extern std::list<Job*> jobs_list;
extern int last_job_id;

 int wait_for_child(int child_pid);
 Job* fndjob_id(int job_id);
 Job* fndjob_pid(int job_pid);
 void deljob(Job* job);
 int test_child_status(int status, Job* job);
// SIGNAL HANDLERS
 void sigchld_hdl(int sig);
 void sigterm_hdl(int sig);
 void set_sighdls(bool shell);

#endif	/* JOBCONTROL_H */

